package com.example.asus.homework11.base;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;

public abstract class BaseActivity extends AppCompatActivity {
    public abstract void initData();
    @Override

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayout());
        initView();
        initEvent();
        initData();
    }



    abstract public int getLayout();

    abstract public void initView();

    abstract public void initEvent();
    public void showToast(String content){

        Toast.makeText(this,content, Toast.LENGTH_LONG).show();
    }
}
